package com.airlines.crewassignment.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang3.builder.CompareToBuilder;

import com.airlines.crewassignment.entity.crew.CrewConflictOther;

/**
 * @author xxxx
 * @date 2018年3月26日 
 * @description
 */

 
public class Crew  implements Serializable,Comparable<Crew>{
	private static final long serialVersionUID = -3830309050298570871L;
	//基本信息模块
	private String workcode;
	private String pCode;
	private String cName;
	private String pyAbbr;//拼音简写
	private Date birthday;
	private Integer age;
	private String sex; //F、M
	private String dutyCode; //F飞行员 C乘务员 A安全员
	private Boolean nationCn; //是否中国籍
	private String depName; //部门
	private Boolean management;	//是否是管理员

	
	//各种维度的资质、经历、授权、能力等信息
	private Boolean newPosition; //是否新机长
	private CrewFlightExperience crewFlightExperience; //经历等数据
	private List<Tech> techIList = new ArrayList<>(); //公司授权
	private String techIName; //公司授权名称
	private List<Tech> techEList = new ArrayList<>(); //局方授权
	private String techEName; //局方授权名称
	private List<Tech> techZList = new ArrayList<>(); //排班授权
	private String techZName; //排班授权名称
	private Skill skill; //技术资质能力
	private CrewConflictOther crewConflictOther; //与其他人不能飞
	private Integer flightDurationLimitOfMonth ; //月飞最大限制（排班授权控制）
	
	
	public String getWorkcode() {
		return workcode;
	}


	public void setWorkcode(String workcode) {
		this.workcode = workcode;
	}


	public String getPCode() {
		return pCode;
	}


	public void setPCode(String pCode) {
		this.pCode = pCode;
	}


	public String getcName() {
		return cName;
	}


	public void setcName(String cName) {
		this.cName = cName;
	}


	public String getPyAbbr() {
		return pyAbbr;
	}


	public void setPyAbbr(String pyAbbr) {
		this.pyAbbr = pyAbbr;
	}


	public Date getBirthday() {
		return birthday;
	}


	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}


	public Integer getAge() {
		return age;
	}


	public void setAge(Integer age) {
		this.age = age;
	}


	public String getSex() {
		return sex;
	}


	public void setSex(String sex) {
		this.sex = sex;
	}


	public String getDutyCode() {
		return dutyCode;
	}


	public void setDutyCode(String dutyCode) {
		this.dutyCode = dutyCode;
	}


	public Boolean getNationCn() {
		return nationCn;
	}


	public void setNationCn(Boolean nationCn) {
		this.nationCn = nationCn;
	}


	public String getDepName() {
		return depName;
	}


	public void setDepName(String depName) {
		this.depName = depName;
	}


	public Boolean getManagement() {
		return management;
	}


	public void setManagement(Boolean management) {
		this.management = management;
	}


	public Boolean getNewPosition() {
		return newPosition;
	}


	public void setNewPosition(Boolean newPosition) {
		this.newPosition = newPosition;
	}


	public CrewFlightExperience getCrewFlightExperience() {
		return crewFlightExperience;
	}


	public void setCrewFlightExperience(CrewFlightExperience crewFlightExperience) {
		this.crewFlightExperience = crewFlightExperience;
	}


	public List<Tech> getTechIList() {
		return techIList;
	}


	public void setTechIList(List<Tech> techIList) {
		this.techIList = techIList;
	}


	public String getTechIName() {
		return techIName;
	}


	public void setTechIName(String techIName) {
		this.techIName = techIName;
	}


	public List<Tech> getTechEList() {
		return techEList;
	}


	public void setTechEList(List<Tech> techEList) {
		this.techEList = techEList;
	}


	public String getTechEName() {
		return techEName;
	}


	public void setTechEName(String techEName) {
		this.techEName = techEName;
	}


	public List<Tech> getTechZList() {
		return techZList;
	}


	public void setTechZList(List<Tech> techZList) {
		this.techZList = techZList;
	}


	public String getTechZName() {
		return techZName;
	}


	public void setTechZName(String techZName) {
		this.techZName = techZName;
	}


	public Skill getSkill() {
		return skill;
	}


	public void setSkill(Skill skill) {
		this.skill = skill;
	}


	public CrewConflictOther getCrewConflictOther() {
		return crewConflictOther;
	}


	public void setCrewConflictOther(CrewConflictOther crewConflictOther) {
		this.crewConflictOther = crewConflictOther;
	}


	public Integer getFlightDurationLimitOfMonth() {
		return flightDurationLimitOfMonth;
	}


	public void setFlightDurationLimitOfMonth(Integer flightDurationLimitOfMonth) {
		this.flightDurationLimitOfMonth = flightDurationLimitOfMonth;
	}


	@Override
	public int compareTo(Crew other) {
		  return new CompareToBuilder()
	                .append(this.getClass().getName(), other.getClass().getName())
	                .append(this.workcode, other.workcode)
	                .toComparison();
	}
}
